import Vue from 'vue'
import Cookies from 'js-cookie'
import 'normalize.css/normalize.css'
import Element from 'element-ui'
import VueClipboard from 'vue-clipboard2'

import './styles/element-variables.scss'

import '@/styles/index.scss'

import App from './App'
import router from './router'
import store from './store'

import './icons'
import * as filters from './filter' // global filters

Vue.use(Element, {
  size: Cookies.get('size') || 'medium'
})

Vue.use(VueClipboard)

// 注册全局过滤器
Object.keys(filters).forEach(key => {
  Vue.filter(key, filters[key])
})

Vue.config.productionTip = false

new Vue({
  el: '#app',
  router,
  store,
  render: h => h(App)
})
